package com.android.task5;

import android.util.Log;

import com.google.android.maps.GeoPoint;

public class BoundingBox {

	/**GeoPoint representing the top right corner of the bounding box */
	GeoPoint topRightCorner;
	/**GeoPoint representing the bottom left corner of the bounding box */
	GeoPoint bottomLeftCorner;

	public BoundingBox(GeoPoint topRightCorner,GeoPoint bottomLeftCorner){

		this.topRightCorner =topRightCorner;
		this.bottomLeftCorner = bottomLeftCorner;
	}

	public GeoPoint getTopRightCorner() {
		return topRightCorner;
	}

	public GeoPoint getBottomLeftCorner() {
		return bottomLeftCorner;
	}


	/** 
	 * Returns the latitude of the bottom left corner as a string.
	 *   */
	public String getBottomLeftCornerLatitude(){
		
		double bottomLeftCornerLatitude =  this.bottomLeftCorner.getLatitudeE6() / 1E6;
		
		Log.i("Flickr Request Info","bottomLeftCornerLatitude: "+bottomLeftCornerLatitude);
		return ""+bottomLeftCornerLatitude;

	}
	/** 
	 * Returns the longitude of the bottom left corner as a string.
	 *   */
	public String getBottomLeftCornerLongitude(){
		double bottomLeftCornerLongitude = this.bottomLeftCorner.getLongitudeE6()/1E6;
		Log.i("Flickr Request Info","bottomLeftCornerLongitude: "+bottomLeftCornerLongitude);

		return ""+bottomLeftCornerLongitude;
	}
	/** 
	 * Returns the latitude of the top right corner as a string.
	 *   */
	public String getTopRightCornerLatitude(){
		
		double topRightCornerLatitude = this.topRightCorner.getLatitudeE6() / 1E6;
		Log.i("Flickr Request Info","topRightCornerLatitude: "+topRightCornerLatitude);

		return ""+topRightCornerLatitude;
		
	}
	/** 
	 * Returns the longitude of the top right corner as a string.
	 *   */
	public String getTopRightCornerLongitude(){
		
		double topRightCornerLongitude = this.topRightCorner.getLongitudeE6() / 1E6;
		Log.i("Flickr Request Info","topRightCornerLongitude: "+topRightCornerLongitude);

		return ""+topRightCornerLongitude;
	}

}

